package com.example.siyun.service.impl.permissionsserviceimpl;

import com.example.siyun.mapper.permissionsmapper.PermissionsTableMapper;
import com.example.siyun.pojo.PermissionsTable;
import com.example.siyun.service.permissionsservice.PermissionsTableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
/**
 * @Auther: 全
 * @Date: 2022/9/26 09:33
 * @Description:权限管理模块权限列表
 */
@Service
public class PermissionsTableServiceImpl implements PermissionsTableService {
    @Autowired
    private PermissionsTableMapper permissionsTableMapper;
    /**
     * 获取权限列表的信息
     * @return 返回权限列表信息
     */
    @Transactional
    @Override
    public List<PermissionsTable> selectPermissionsTable(PermissionsTable permissionsTable,int isdel) {
        return permissionsTableMapper.selectPermissionsTable(permissionsTable,isdel);
    }
    /**
     * 通过id删除对应的管理人员
     * @return 返回台管理人员列表的数据
     */
    @Transactional
    @Override
    public void delPermissionsTable(int id,int isdel) {
        permissionsTableMapper.delPermissionsTable(id,isdel);
    }
    /**
     * 通过id修改对应的账号状态
     */
    @Transactional
    @Override
    public void updateIsEnable(int id, int status) {
        permissionsTableMapper.updateIsEnable(id,status);
    }
    /**
     * 通过id查询对应的管理人员信息
     * @return 返回查询出来的管理人员信息
     */
    @Transactional
    @Override
    public PermissionsTable selePerById(int id) {
        return permissionsTableMapper.selePerById(id);
    }
    @Transactional
    @Override
    public void updateOerMissions(PermissionsTable permissionsTable) {
        permissionsTableMapper.updateOerMissions(permissionsTable);
    }
    @Transactional
    @Override
    public void addPermissionsTable(PermissionsTable permissionsTable,int isdel) {
        permissionsTableMapper.addPermissionsTable(permissionsTable,isdel);
    }
}
